package com.atguigu.gmall.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
@Component
public class RedisUtil {

    @Autowired
    private JedisPool jedisPool;
    public Jedis getJedis(){
        Jedis jedis = jedisPool.getResource();

        return jedis;
    }

}
